#pragma once

class Rotator
{
public:
	INT X, Y, Z;
	
	Rotator() {}
	Rotator(INT x, INT y, INT z) : X(x), Y(y), Z(z) {}
	Rotator(const Rotator& v) : X(v.X), Y(v.Y), Z(v.Z) {}
	Rotator(const Quaternion& quat);

	Quaternion Quat() const;
	
	Rotator operator+( const Rotator& v ) const { return Rotator( X + v.X, Y + v.Y, Z + v.Z ); }
	Rotator operator-( const Rotator& v ) const { return Rotator( X - v.X, Y - v.Y, Z - v.Z ); }

	// Binary comparison operators.
	bool operator==( const Rotator& v ) const { return X==v.X && Y==v.Y && Z==v.Z; }
	bool operator!=( const Rotator& v ) const { return X!=v.X || Y!=v.Y || Z!=v.Z; }

	// Unary operators.
	Rotator operator-() const { return Rotator( -X, -Y, -Z ); }

	// Assignment operators.
	Rotator operator+=( const Rotator& v ) { X += v.X; Y += v.Y; Z += v.Z; return *this; }
	Rotator operator-=( const Rotator& v ) { X -= v.X; Y -= v.Y; Z -= v.Z; return *this; }

	static const Rotator Identity;
};

